package com.szqhyxj.youxiangju.biz.merchantHome.notice;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.szqhyxj.youxiangju.R;
import com.szqhyxj.youxiangju.biz.merchantHome.bean.FacilityList;
import com.szqhyxj.youxiangju.biz.merchantHome.notice.NoticeModel;
import com.szqhyxj.youxiangju.biz.merchantHome.shop.adapter.FacilityListAdapter;
import com.szqhyxj.youxiangju.sys.components.view.popview.BaseDialog;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import retrofit2.http.HEAD;

/**
 * leung
 * on 2018/12/11
 */
public class NoticePopView extends BaseDialog {

    TextView noticeContent;
    TextView noticeCreateTime;
    TextView noticeTitle;
    ImageView close;

    public NoticePopView(Context context, NoticeModel.NoticeBean noticeBean) {
        super(context);
        noticeContent.setText("     " + noticeBean.getNoticeInfo());
        String date =noticeBean.getNoticeStartTime()+"";
        String str = date.substring(0, date.indexOf(" "));
        noticeCreateTime.setText( str+ "");
        noticeTitle.setText(noticeBean.getNoticeTitle() + "");

    }


    @Override
    protected View initDialogView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.popview_notice, null);
        noticeContent = view.findViewById(R.id.noticeContent);
        noticeCreateTime = view.findViewById(R.id.noticecreattime);
        noticeTitle = view.findViewById(R.id.noticeTitle);
        close = view.findViewById(R.id.close);
        close.setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View v){
        super.onClick(v);
        switch(v.getId()){
            case R.id.close:
                dismiss();
                break;

        }
    }

}



